<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Amaze UI Admin index Examples</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="../assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="../assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="../assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="../assets/css/admin.css">
    <link rel="stylesheet" href="../assets/css/app.css">
 <script type="text/javascript">
    function checkNum(){
        if($('.switch-anim').prop('checked')){
            console.log("选中");
        }else{
            console.log("没选中");
        }
    }
</script>
    <style type="text/css">
    .divInline{display: inline-block;}
    .switch {
            width: 57px;
            height: 28px;
            position: relative;
            border: 1px solid #dfdfdf;
            background-color: #fdfdfd;
            box-shadow: #dfdfdf 0 0 0 0 inset;
            border-radius: 20px;
            background-clip: content-box;
            display: inline-block;
            -webkit-appearance: none;
            user-select: none;
            outline: none;
        }
        .switch:before {
            content: '';
            width: 26px;
            height: 26px;
            position: absolute;
            top: 0;
            left: 0;
            border-radius: 20px;
            background-color: #fff;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }
        .switch:checked {
            border-color: #64bd63;
            box-shadow: #64bd63 0 0 0 16px inset;
            background-color: #64bd63;
        }
        .switch:checked:before {
            left: 30px;
        }
        .switch.switch-anim {
            transition: border cubic-bezier(0, 0, 0, 1) 0.4s, box-shadow cubic-bezier(0, 0, 0, 1) 0.4s;
        }
        .switch.switch-anim:before {
            transition: left 0.3s;
        }
        .switch.switch-anim:checked {
            box-shadow: #64bd63 0 0 0 16px inset;
            background-color: #64bd63;
            transition: border ease 0.4s, box-shadow ease 0.4s, background-color ease 1.2s;
        }
        .switch.switch-anim:checked:before {
            transition: left 0.3s;
        }
        #intervalButton,#rangMinButton,#rangMaxButton{
        background:#eaeaea;
        } 
        
        .am-modal-btn{
        background:#0080ff;
        }
    </style>
</head>

<body data-type="generalComponents">


    <header class="am-topbar am-topbar-inverse admin-header">
        <div class="am-topbar-brand">
           <!--  <a href="javascript:;" class="tpl-logo">
            <div> -->
                <img src="../assets/img/logo3.png" alt=""  style="height: 70px;width: 70px"><img src="../assets/img/logo2.png"  style="height: 50px;width: 100px" alt="">
           <!--  </div>
            </a> -->
        </div>
        <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right">

        </div>

        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>

        <div class="am-collapse am-topbar-collapse" id="topbar-collapse">

            <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="am-icon-bell-o"></span> 提醒 <span class="am-badge tpl-badge-success am-round">5</span></span>
                    </a>
                    <ul class="am-dropdown-content tpl-dropdown-content">
                        <li class="tpl-dropdown-content-external">
                            <h3>你有 <span class="tpl-color-success">5</span> 条提醒</h3><a href="###">全部</a></li>
                        <li class="tpl-dropdown-list-bdbc"><a href="#" class="tpl-dropdown-list-fl"><span class="am-icon-btn am-icon-plus tpl-dropdown-ico-btn-size tpl-badge-success"></span> 【预览模块】移动端 查看时 手机、电脑框隐藏。</a>
                            <span class="tpl-dropdown-list-fr">3小时前</span>
                        </li>
                        <li class="tpl-dropdown-list-bdbc"><a href="#" class="tpl-dropdown-list-fl"><span class="am-icon-btn am-icon-check tpl-dropdown-ico-btn-size tpl-badge-danger"></span> 移动端，导航条下边距处理</a>
                            <span class="tpl-dropdown-list-fr">15分钟前</span>
                        </li>
                        <li class="tpl-dropdown-list-bdbc"><a href="#" class="tpl-dropdown-list-fl"><span class="am-icon-btn am-icon-bell-o tpl-dropdown-ico-btn-size tpl-badge-warning"></span> 追加统计代码</a>
                            <span class="tpl-dropdown-list-fr">2天前</span>
                        </li>
                    </ul>
                </li>
                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="am-icon-comment-o"></span> 消息 <span class="am-badge tpl-badge-danger am-round">9</span></span>
                    </a>
                    <ul class="am-dropdown-content tpl-dropdown-content">
                        <li class="tpl-dropdown-content-external">
                            <h3>你有 <span class="tpl-color-danger">9</span> 条新消息</h3><a href="###">全部</a></li>
                        <li>
                            <a href="#" class="tpl-dropdown-content-message">
                                <span class="tpl-dropdown-content-photo">
                      <img src="../assets/img/user02.png" alt=""> </span>
                                <span class="tpl-dropdown-content-subject">
                      <span class="tpl-dropdown-content-from"> 禁言小张 </span>
                                <span class="tpl-dropdown-content-time">10分钟前 </span>
                                </span>
                                <span class="tpl-dropdown-content-font"> Amaze UI 的诞生，依托于 GitHub 及其他技术社区上一些优秀的资源；Amaze UI 的成长，则离不开用户的支持。 </span>
                            </a>
                            <a href="#" class="tpl-dropdown-content-message">
                                <span class="tpl-dropdown-content-photo">
                      <img src="../assets/img/user03.png" alt=""> </span>
                                <span class="tpl-dropdown-content-subject">
                      <span class="tpl-dropdown-content-from"> Steam </span>
                                <span class="tpl-dropdown-content-time">18分钟前</span>
                                </span>
                                <span class="tpl-dropdown-content-font"> 为了能最准确的传达所描述的问题， 建议你在反馈时附上演示，方便我们理解。 </span>
                            </a>
                        </li>

                    </ul>
                </li>
                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="am-icon-calendar"></span> 进度 <span class="am-badge tpl-badge-primary am-round">4</span></span>
                    </a>
                    <ul class="am-dropdown-content tpl-dropdown-content">
                        <li class="tpl-dropdown-content-external">
                            <h3>你有 <span class="tpl-color-primary">4</span> 个任务进度</h3><a href="###">全部</a></li>
                        <li>
                            <a href="javascript:;" class="tpl-dropdown-content-progress">
                                <span class="task">
                        <span class="desc">Amaze UI 用户中心 v1.2 </span>
                                <span class="percent">45%</span>
                                </span>
                                <span class="progress">
                        <div class="am-progress tpl-progress am-progress-striped"><div class="am-progress-bar am-progress-bar-success" style="width:45%"></div></div>
                    </span>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:;" class="tpl-dropdown-content-progress">
                                <span class="task">
                        <span class="desc">新闻内容页 </span>
                                <span class="percent">30%</span>
                                </span>
                                <span class="progress">
                       <div class="am-progress tpl-progress am-progress-striped"><div class="am-progress-bar am-progress-bar-secondary" style="width:30%"></div></div>
                    </span>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:;" class="tpl-dropdown-content-progress">
                                <span class="task">
                        <span class="desc">管理中心 </span>
                                <span class="percent">60%</span>
                                </span>
                                <span class="progress">
                        <div class="am-progress tpl-progress am-progress-striped"><div class="am-progress-bar am-progress-bar-warning" style="width:60%"></div></div>
                    </span>
                            </a>
                        </li>

                    </ul>
                </li>
                <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen" class="tpl-header-list-link"><span class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a></li>

                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="tpl-header-list-user-nick">禁言小张</span><span class="tpl-header-list-user-ico"> <img src="../assets/img/user01.png"></span>
                    </a>
                    <ul class="am-dropdown-content">
                        <li><a href="#"><span class="am-icon-bell-o"></span> 资料</a></li>
                        <li><a href="#"><span class="am-icon-cog"></span> 设置</a></li>
                        <li><a href="#"><span class="am-icon-power-off"></span> 退出</a></li>
                    </ul>
                </li>
                <li><a href="###" class="tpl-header-list-link"><span class="am-icon-sign-out tpl-header-list-ico-out-size"></span></a></li>
            </ul>
        </div>
    </header>







    <div class="tpl-page-container tpl-page-header-fixed">

 <div class="tpl-left-nav tpl-left-nav-hover">
            <div class="tpl-left-nav-title">
                Amaze UI 列表
            </div>
            <div class="tpl-left-nav-list">
                <ul class="tpl-left-nav-menu">
                    <li class="tpl-left-nav-item">
                        <a href="index.html" class="nav-link">
                            <i class="am-icon-home"></i>
                            <span>首页</span>
                        </a>
                    </li>
                    <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-table"></i>
                            <span>设备管理</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu">
                            <li>
                                <a href="equ-msg-show.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>设备信息查看</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>


                                    <a href="equ-exc-show.html">
                                        <i class="am-icon-angle-right"></i>
                                        <span>设备异常信息</span>
                                        <i class="tpl-left-nav-content tpl-badge-primary">
               5
             </i>


                                        <a href="equ-video-show.html">
                                            <i class="am-icon-angle-right"></i>
                                            <span>监控视频</span>

                                        </a>
                            </li>
                        </ul>
                    </li>
                    
                    <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-table"></i>
                            <span>猪栏管理</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu">
                            <li>
                                <a href="table-font-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>文字表格</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>

                                <a href="table-images-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>图片表格</span>
                                    <i class="tpl-left-nav-content tpl-badge-success">
               18
             </i>

                                    <a href="form-news.html">
                                        <i class="am-icon-angle-right"></i>
                                        <span>消息列表</span>
                                        <i class="tpl-left-nav-content tpl-badge-primary">
               5
             </i>


                                        <a href="form-news-list.html">
                                            <i class="am-icon-angle-right"></i>
                                            <span>文字列表</span>

                                        </a>
                                    <ul class="tpl-left-nav-sub-menu">
                                    	<li>
                                    		<a href="table-font-list.html">
			                                    <i class="am-icon-angle-right"></i>
			                                    <span>文字表格</span>
			                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
			                                </a>
                                    	</li>
                                    </ul>
                            </li>
                        </ul>
                    </li>
                    
                    <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-table"></i>
                            <span>猪只管理</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu">
                            <li class="tpl-left-nav-item">
                                <a href="table-font-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>文字表格</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>
                                

                                <a href="table-images-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>图片表格</span>
                                    <i class="tpl-left-nav-content tpl-badge-success">18 </i>
             </a>

                                    <a href="form-news.html">
                                        <i class="am-icon-angle-right"></i>
                                        <span>消息列表</span>
                                        <i class="tpl-left-nav-content tpl-badge-primary">
               5
             </i>
           </a>

                                        <a href="form-news-list.html">
                                            <i class="am-icon-angle-right"></i>
                                            <span>文字列表</span>

                                        </a>
                                    
                            </li>
                        </ul>
                    </li>
                    
                     <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list active">
                            <i class="am-icon-table"></i>
                            <span>母猪管理</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu" style="display: block;>
                            <li class="tpl-left-nav-item">
                                <a href="sowpei.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>母猪配种管理</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>
                                

                                <a href="sowfen.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>母猪分娩管理</span>
                                    <i class="tpl-left-nav-content tpl-badge-success">18 </i>
             </a>

                                    <a href="sowduan.html">
                                        <i class="am-icon-angle-right"></i>
                                        <span>母猪断奶管理</span>
                                        <i class="tpl-left-nav-content tpl-badge-primary">
               5
             </i>
           </a>

                                      
                                    
                            </li>
                        </ul>
                    </li>
                    
                    
                    
                    
                    <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-table"></i>
                            <span>用户管理</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu">
                            <li>
                                <a href="table-font-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>文字表格</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>

                                <a href="table-images-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>图片表格</span>
                                    <i class="tpl-left-nav-content tpl-badge-success">
               18
             </i>

                                    <a href="form-news.html">
                                        <i class="am-icon-angle-right"></i>
                                        <span>消息列表</span>
                                        <i class="tpl-left-nav-content tpl-badge-primary">
               5
             </i>


                                        <a href="form-news-list.html">
                                            <i class="am-icon-angle-right"></i>
                                            <span>文字列表</span>

                                        </a>
                            </li>
                        </ul>
                    </li>
                    
                    

                    <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-table"></i>
                            <span>算法管理</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu">
                            <li>
                                <a href="table-font-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>文字表格</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>

                                <a href="table-images-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>图片表格</span>
                                    <i class="tpl-left-nav-content tpl-badge-success">
               18
             </i>

                                    <a href="form-news.html">
                                        <i class="am-icon-angle-right"></i>
                                        <span>消息列表</span>
                                        <i class="tpl-left-nav-content tpl-badge-primary">
               5
             </i>


                                        <a href="form-news-list.html">
                                            <i class="am-icon-angle-right"></i>
                                            <span>文字列表</span>

                                        </a>
                            </li>
                        </ul>
                    </li>

                    <li class="tpl-left-nav-item">
                        <!-- 打开状态 a 标签添加 active 即可   -->
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list active">
                            <i class="am-icon-wpforms"></i>
                            <span>猪只安全</span>
                            <!-- 列表打开状态的i标签添加 tpl-left-nav-more-ico-rotate 图表即90°旋转  -->
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                        </a>
                        <!-- 打开状态 添加 display:block-->
                        <ul class="tpl-left-nav-sub-menu" style="display: block;">
                            <li>
                            	<a href="vaccination-setting.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>接种疫苗设置</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>
                                <a href="vaccina-record-manage.html"  class="active">
                                    <i class="am-icon-angle-right"></i>
                                    <span>疫苗记录管理</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>
                                <a href="disease-manage.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>疾病管理</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>
                                                               
                            </li>
                        </ul>
                    </li>
                    <li class="tpl-left-nav-item">
                        <!-- 打开状态 a 标签添加 active 即可   -->
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-wpforms"></i>
                            <span>维护安全管理</span>
                            <!-- 列表打开状态的i标签添加 tpl-left-nav-more-ico-rotate 图表即90°旋转  -->
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                        </a>
                        <!-- 打开状态 添加 display:block-->
                        <ul class="tpl-left-nav-sub-menu">
                            <li>
                            	<a href="log-manage.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>日志管理</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>
                                <a href="log-analyze.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>日志分析</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>
                                <a href="data-backup-recover.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>数据备份和恢复</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>
                                                               
                            </li>
                        </ul>
                    </li>
                    
                    <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-table"></i>
                            <span>库存管理</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu">
                            <li>
                                <a href="table-font-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>文字表格</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>

                                <a href="table-images-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>图片表格</span>
                                    <i class="tpl-left-nav-content tpl-badge-success">
               18
             </i>

                                    <a href="form-news.html">
                                        <i class="am-icon-angle-right"></i>
                                        <span>消息列表</span>
                                        <i class="tpl-left-nav-content tpl-badge-primary">
               5
             </i>


                                        <a href="form-news-list.html">
                                            <i class="am-icon-angle-right"></i>
                                            <span>文字列表</span>

                                        </a>
                            </li>
                        </ul>
                    </li>
                    
                    <li class="tpl-left-nav-item">
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-table"></i>
                            <span>养护结算管理</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu">
                            <li>
                                <a href="table-font-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>文字表格</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>

                                <a href="table-images-list.html">
                                    <i class="am-icon-angle-right"></i>
                                    <span>图片表格</span>
                                    <i class="tpl-left-nav-content tpl-badge-success">
               18
             </i>

                                    <a href="form-news.html">
                                        <i class="am-icon-angle-right"></i>
                                        <span>消息列表</span>
                                        <i class="tpl-left-nav-content tpl-badge-primary">
               5
             </i>


                                        <a href="form-news-list.html">
                                            <i class="am-icon-angle-right"></i>
                                            <span>文字列表</span>

                                        </a>
                            </li>
                        </ul>
                    </li>
                    
                </ul>
            </div>
        </div>





        <div class="tpl-content-wrapper">
            <div class="tpl-portlet-components">
<!--                 <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span> 列表
                    </div>
                    <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input input-small input-inline">
                            <div class="input-icon right">
                                <i class="am-icon-search"></i>
                                <input type="text" class="form-control form-control-solid" placeholder="搜索..."> </div>
                        </div>
                    </div>
                </div> -->
                <div class="tpl-block">
                    <div class="am-g">
<!--                         <div class="am-u-sm-12 am-u-md-6">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <button type="button" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</button>
                                    <button type="button" class="am-btn am-btn-default am-btn-secondary"><span class="am-icon-save"></span> 保存</button>
                                    <button type="button" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-archive"></span> 审核</button>
                                    <button type="button" class="am-btn am-btn-default am-btn-danger"><span class="am-icon-trash-o"></span> 删除</button>
                                </div>
                            </div>
                        </div> -->
                        <div class="am-u-sm-12 am-u-md-3">
                            <div id="equTypeDiv" class="am-form-group">
                                <select id="equTypeSelect" data-am-selected="{btnSize: 'sm'}">
					             <!--  <option value="allEquType">所有(设备类型)</option> -->
					             <!--  <option value="传感器">传感器</option> -->
					              <!-- <option value="环控设备">环控设备</option>
					              <option value="饲喂设备">饲喂设备</option>
					              <option value="监控设备">监控设备</option> -->
					            </select>
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-3">
                            <div class="am-form-group">
                                <select hidden="" id="equNameSelect" data-am-selected="{btnSize: 'sm'}">
					             <option value="allEquName">所有(设备名称)</option>
					             <!--  <option value="option2">IT业界</option>
					              <option value="option3">数码产品</option>
					              <option value="option3">笔记本电脑</option>
					              <option value="option3">平板电脑</option>
					              <option value="option3">只能手机</option>
					              <option value="option3">超极本</option> -->
					            </select>
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-3">
                            <div class="am-form-group">
                                <select id="pigstyIdSelect" data-am-selected="{btnSize: 'sm'}">
					              <option value="0">所有(猪舍编号)</option>
					              <!-- <option value="option2">IT业界</option>
					              <option value="option3">数码产品</option>
					              <option value="option3">笔记本电脑</option>
					              <option value="option3">平板电脑</option>
					              <option value="option3">只能手机</option>
					              <option value="option3">超极本</option> -->
					            </select>
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-2">
                            <div class="am-form-group">
                                <select id="hogcoteIdSelect" data-am-selected="{btnSize: 'sm'}">
					              <option value="0">所有(猪栏编号)</option>
					              <!-- <option value="option2">IT业界</option>
					              <option value="option3">数码产品</option>
					              <option value="option3">笔记本电脑</option>
					              <option value="option3">平板电脑</option>
					              <option value="option3">只能手机</option>
					              <option value="option3">超极本</option> -->
					            </select>
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-1">
                            <div class="am-form-group">
								<button
								  onclick="dataView()"
								  type="button"
								  class="am-btn am-btn-danger"
								  >
								  可视化
								</button>
                            </div>
                        </div>
                    </div>
                    <!-- <div class="am-popup" id="my-popup">
					  <div class="am-popup-inner">
					    <div class="am-popup-hd">
					      <h4 class="am-popup-title">可视化</h4>
					      <span data-am-modal-close
					            class="am-close">&times;</span>
					    </div>
					    <div id="dataViewDiv" class="am-popup-bd">
					      
					    </div>
					  </div>
					</div> -->
					<div style="display: block;height:600px;width:1200px;position: fixed;top: 0px;left: 0px;right: 0px;bottom: 0px;margin: auto;" class="am-popup" id="my-popup">
					  <div class="am-popup-inner">
					    <div class="am-popup-hd">
					      <h4 class="am-popup-title">可视化</h4>
					      <span data-am-modal-close
					          class="am-close">&times;</span>
					    </div>
					    <div class="">
					     	<div class="am-alert am-alert-danger" id="my-alert" style="display: none">
							  <p>开始日期应小于结束日期！</p>
							</div>
							<div class="am-g">
							  <div class="am-u-sm-5">
							    <button type="button" class="am-btn am-btn-default am-margin-right" id="my-start">开始日期</button><span id="my-startDate"></span>
							  </div>
							  <div class="am-u-sm-5">
							    <button type="button" class="am-btn am-btn-default am-margin-right" id="my-end">结束日期</button><span id="my-endDate"></span>
							  </div>
							  <div class="am-u-sm-2">
							    <button id='viewButton' type="button" class="am-btn am-btn-primary btn-loading-example">可视化</button>
							  </div>
							</div>
					    </div>
					    <div style="width:600px;height:20px;">
					    </div>
					    <div class="am-g">
                        <div class="am-u-sm-12">
						    <div class="am-u-sm-12 am-u-md-6 divInline" style="width: 500px;height:600px;" id="dataViewDiv" >
						      
						    </div>
						    <div class="am-u-sm-12 am-u-md-6 divInline" style="width: 600px;height:600px;" id="dataPanelDiv" >
						      
						    </div>
                        </div>
                        </div>
					  </div>
					</div>
<!-- 	<div id='sensorControl' class="am-popup" tabindex="-1">
	<div class="am-popup-inner">
        <div class="am-modal-dialog">
    		<div class="am-modal-hd">传感器控制</div>
    		</div>
		    <font size="6">运行状态:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		   	<br/><font size="6">是否异常处理:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		    <br/><font size="6">采集间隔:</font> <input id='intervalButton' style='font-size:25px' style="width:100px;height:25px;vertical-align:middle" type="number" min="0" max="10" step="1" value="6">
		  	<br/><br/>
		  	<div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel><font size="4" color="white">取消</font></span>
		      <span class="am-modal-btn" data-am-modal-confirm><font size="4" color="white">提交</font></span>
		    </div>
  		</div>
  	</div>
	</div>
	<div id='controlControl' class="am-popup" tabindex="-1">
	<div class="am-popup-inner">
        <div class="am-modal-dialog">
    		<div class="am-modal-hd">环控设备控制</div>
    		</div>
		    <font size="6">运行状态:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		   	<br/><font size="6">是否异常处理:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		    <br/><font size="6">阈值:</font> <input id='rangMinButton' style='font-size:25px' style="width:100px;height:25px;vertical-align:middle" type="number" min="0" max="10" step="1" value="6">
		    <font size="4">---</font> <input id='rangMaxButton' style='font-size:25px' style="width:100px;height:25px;vertical-align:middle" type="number" min="0" max="10" step="1" value="6">
		  	<br/><br/>
		  	<div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel><font size="4" color="white">取消</font></span>
		      <span class="am-modal-btn" data-am-modal-confirm><font size="4" color="white">提交</font></span>
		    </div>
  		</div>
  	</div>
	</div>
	<div id='feedControl' class="am-popup" tabindex="-1">
	<div class="am-popup-inner">
        <div class="am-modal-dialog">
    		<div class="am-modal-hd">饲喂控制</div>
    		</div>
		    <font size="6">运行状态:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		   	<br/><font size="6">是否异常处理:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		  	<br/><br/>
		  	<div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel><font size="4" color="white">取消</font></span>
		      <span class="am-modal-btn" data-am-modal-confirm><font size="4" color="white">提交</font></span>
		    </div>
  		</div>
  	</div>
	</div>
	<div id='monitorControl' class="am-popup" tabindex="-1">
	<div class="am-popup-inner">
        <div class="am-modal-dialog">
    		<div class="am-modal-hd">监控设备控制</div>
    		</div>
		    <font size="6">运行状态:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		   	<br/><font size="6">是否异常处理:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		  	<br/><br/>
		  	<div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel><font size="4" color="white">取消</font></span>
		      <span class="am-modal-btn" data-am-modal-confirm><font size="4" color="white">提交</font></span>
		    </div>
  		</div>
  	</div>
	</div> -->
	<div id='equControl' class="am-modal am-modal-prompt" tabindex="-1">
        <div class="am-modal-dialog" id="equControlDiv">
  		</div>
	</div>
<!-- 	<div id='sensorControl' class="am-modal am-modal-prompt" tabindex="-1">
        <div class="am-modal-dialog">
    		<div class="am-modal-hd">传感器控制</div>
    		</div>
		    <font size="6">运行状态:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		   	<br/><font size="6">是否异常处理:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		    <br/><font size="6">采集间隔:</font> <input id='intervalButton' style='font-size:25px' style="width:100px;height:25px;vertical-align:middle" type="number" min="0" max="10" step="1" value="6">
		  	<br/><br/>
		  	<div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel><font size="4" color="white">取消</font></span>
		      <span class="am-modal-btn" data-am-modal-confirm><font size="4" color="white">提交</font></span>
		    </div>
  		</div>
	</div>
	<div id='controlControl' class="am-modal am-modal-prompt" tabindex="-1">
        <div class="am-modal-dialog">
    		<div class="am-modal-hd">环控设备控制</div>
    		</div>
		    <font size="6">运行状态:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		   	<br/><font size="6">是否异常处理:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		    <br/><font size="6">阈值:</font> <input id='rangMinButton' style='font-size:25px' style="width:100px;height:25px;vertical-align:middle" type="number" min="0" max="10" step="1" value="6">
		    <font size="4">---</font> <input id='rangMaxButton' style='font-size:25px' style="width:100px;height:25px;vertical-align:middle" type="number" min="0" max="10" step="1" value="6">
		  	<br/><br/>
		  	<div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel><font size="4" color="white">取消</font></span>
		      <span class="am-modal-btn" data-am-modal-confirm><font size="4" color="white">提交</font></span>
		    </div>
  		</div>
	</div>
	<div id='feedControl' class="am-modal am-modal-prompt" tabindex="-1">
        <div class="am-modal-dialog">
    		<div class="am-modal-hd">饲喂控制</div>
    		</div>
		    <font size="6">运行状态:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		   	<br/><font size="6">是否异常处理:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		  	<br/><br/>
		  	<div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel><font size="4" color="white">取消</font></span>
		      <span class="am-modal-btn" data-am-modal-confirm><font size="4" color="white">提交</font></span>
		    </div>
  		</div>
	</div>
	<div id='monitorControl' class="am-modal am-modal-prompt" tabindex="-1">
        <div class="am-modal-dialog">
    		<div class="am-modal-hd">监控设备控制</div>
    		</div>
		    <font size="6">运行状态:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		   	<br/><font size="6">是否异常处理:</font><input class="switch switch-anim" onchange="checkNum()" type="checkbox" checked />
		  	<br/><br/>
		  	<div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel><font size="4" color="white">取消</font></span>
		      <span class="am-modal-btn" data-am-modal-confirm><font size="4" color="white">提交</font></span>
		    </div>
  		</div>
	</div> -->
	
					 
                    <div class="am-g">
                        <div class="am-u-sm-12">
                            <form class="am-form">
                                <table class="am-table am-table-striped am-table-hover table-main">
                                    <thead>
                                        <tr id="tableHead">
                                            <th class="table-check"><input type="checkbox" value="allId" class="tpl-table-fz-check"></th>
                                            <th class="table-title">设备ID</th>
                                            <th class="table-title">猪舍ID</th>
                                            <th class="table-title">猪栏ID</th>
                                            <th class="table-title">猪只ID</th>
                                            <th class="table-title">设备类型</th>
                                            <th class="table-title">设备名称</th>
                                            <th class="table-title">设备状态</th>
                                            <th class="table-title">时间间隔</th>
                                            <th class="table-title">自动异常处理</th>
                                            <!-- <th class="table-title">采集数据</th>
                                            <th class="table-date am-hide-sm-only">采集时间</th>  -->
                                                                                     <!--  <th class="table-id">ID</th>
                                            <th class="table-title">设备ID</th>
                                            <th class="table-type">类别</th>
                                            <th class="table-author am-hide-sm-only">作者</th>
                                            <th class="table-date am-hide-sm-only">修改日期</th>
                                            <th class="table-set">操作</th> -->
                                            <th id='editTitle' class="table-title">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody id="tableBody">
                                        <!-- <tr id="tableBodyRow">
                                            <td><input type="checkbox"></td>
                                            <td>1</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr> -->
                                    </tbody>
                                        <!-- <tr>
                                            <td><input type="checkbox"></td>
                                            <td>2</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>3</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>4</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>5</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>6</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>7</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>8</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>9</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>10</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>11</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>12</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>13</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>14</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试14号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><input type="checkbox"></td>
                                            <td>15</td>
                                            <td><a href="#">Business management</a></td>
                                            <td>default</td>
                                            <td class="am-hide-sm-only">测试1号</td>
                                            <td class="am-hide-sm-only">2014年9月4日 7:28:47</td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-copy"></span> 复制</button>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </tbody> -->
                                </table>
                                <div class="am-cf">

                                    <div class="am-fr">
                                        <ul class="am-pagination tpl-pagination">
                                        </ul>
                                    </div>
                                </div>
                                <hr>

                            </form>
                        </div>

                    </div>
                </div>
                <div class="tpl-alert"></div>
            </div>

        </div>

    </div>
<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/amazeui.min.js"></script>
<script src="../assets/js/app.js"></script>
<script src="../assets/js/echarts.min.js"></script>
<script type="text/javascript">
var pageIndex = 1;
var sensorIds = new Array();
var sensorNames;
var startTime;
var endTime;
var panelOptions = new Array();
var dataPanelItems = new Array();
var ITemp = 0;
$(document).ready(function(){
	
 	$("#equTypeSelect").empty();
 	/* $("#equNameSelect option:not(:first)").remove(); */
	
 	var jsonConditionObj = {
			"equType":"",
			"equName":"",
			"pigstyId":"",
			"hogcoteId":"",
			"pageIndex":1
	}
	equMsgShow(JSON.stringify(jsonConditionObj),"equTypeSelect"); 
});
var pathName=window.location.pathname;
var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1);
function equMsgShow(condition, select) {
	$.ajax({
		url:projectName+"/equ/equMsgShow.do",
		type:"post",
		contentType:'application/json;charset=utf-8',
        data: condition,
		success: function(result){
			var totalPage = result.extend.totalPage;
        	var conditionList = result.extend.conditionList;
        	var tableBodyList = result.extend.tableBodyList;
			switch(select){
			case "equTypeSelect":
	        	$.each(conditionList.equTypeList,function(index,equType){
	        		var option = $("#equTypeSelect").append("<option value='"+equType+"'>"+equType+"</option>");
				});
	        	$.each(conditionList.equNameList,function(index,equName){
	        		var option = $("#equNameSelect").append("<option value='"+equName+"'>"+equName+"</option>");
				});
				break;
			case "equNameSelect":
	        	$.each(conditionList.equNameList,function(index,equName){
	        		var option = $("#equNameSelect").append("<option value='"+equName+"'>"+equName+"</option>");
				});
			case "pigstyIdSelect":
				$.each(conditionList.pigstyIdList,function(index,pigstyId){
	        		var option = $("#pigstyIdSelect").append("<option value='"+pigstyId+"'>"+pigstyId+"</option>");
				});
				break;
			case "hogcoteIdSelect":
				$.each(conditionList.hogcoteIdList,function(index,hogcoteId){
	        		var option = $("#hogcoteIdSelect").append("<option value='"+hogcoteId+"'>"+hogcoteId+"</option>");
				});
				break;
			default:break;
			}
			$("#tableBody").empty();
			switch($("#equTypeSelect").val()){
				case "传感器":
		        	$.each(tableBodyList.sensorVoList,function(index,sensorVo){
		        		var tableBodyRow = $("<tr equId="+sensorVo.equId+"></tr>");
		        		$("#tableBody").append(tableBodyRow);
		        		tableBodyRow.append("<td><input name='"+sensorVo.equName+"' value='"+sensorVo.equId+"' type='checkbox'></td>")
		        		.append("<td>"+sensorVo.equId+"</td>")
		        		.append("<td>"+sensorVo.pigstyId+"</td>")
		        		.append("<td>"+sensorVo.hogcoteId+"</td>")
		        		.append("<td>"+sensorVo.pigId+"</td>")
		        		.append("<td>"+sensorVo.equType+"</td>")
		        		.append("<td>"+sensorVo.equName+"</td>")
		        		.append("<td>"+sensorVo.workState+"</td>")
		        		.append("<td>"+sensorVo.timeInterval+"</td>")
		        		.append("<td>"+sensorVo.isAutoHandle+"</td>")
		        		.append("<div clickDiv='1' onclick='editOper("+sensorVo.equId+",&quot;"+sensorVo.equType+"&quot;,&quot;"+sensorVo.workState+"&quot;,&quot;"+sensorVo.isAutoHandle+"&quot;,"+sensorVo.timeInterval+",1,1)' class='am-btn-toolbar'><div class='am-btn-group am-btn-group-xs'><button type='button' class='am-btn am-btn-default am-btn-xs am-text-secondary editFlag'><span  class='am-icon-pencil-square-o'></span> 编辑</button></div></div>")
		        	});
					break;
				case "环控设备":
					$.each(tableBodyList.controlEquVoList,function(index,controlEqu){
						var tableBodyRow = $("<tr equId="+controlEqu.equId+"></tr>");
		        		$("#tableBody").append(tableBodyRow);
		        		tableBodyRow.append("<td>"+controlEqu.equId+"</td>")
		        		.append("<td>"+controlEqu.pigstyId+"</td>")
		        		.append("<td>"+controlEqu.hogcoteId+"</td>")
		        		.append("<td>"+controlEqu.equType+"</td>")
		        		.append("<td>"+controlEqu.equName+"</td>")
		        		.append("<td>"+controlEqu.workState+"</td>")
		        		.append("<td>"+controlEqu.rangMin+"</td>")
		        		.append("<td>"+controlEqu.rangMax+"</td>")
		        		.append("<td>"+controlEqu.isAutoHandle+"</td>")
		        		.append("<div clickDiv='1' onclick='editOper("+controlEqu.equId+",&quot;"+controlEqu.equType+"&quot;,&quot;"+controlEqu.workState+"&quot;,&quot;"+controlEqu.isAutoHandle+"&quot;,1,"+controlEqu.rangMin+","+controlEqu.rangMax+")' class='am-btn-toolbar'><div class='am-btn-group am-btn-group-xs'><button type='button' class='am-btn am-btn-default am-btn-xs am-text-secondary editFlag'><span class='am-icon-pencil-square-o'></span> 编辑</button></div></div>")
					});
					break;// equId='"+sensorVo.equId+"' equName='"+sensorVo.equName+"'
				case "饲喂设备":
					$.each(tableBodyList.feedEquVoList,function(index,feedEqu){
						var tableBodyRow = $("<tr equId="+feedEqu.equId+"></tr>");
		        		$("#tableBody").append(tableBodyRow);
		        		tableBodyRow.append("<td>"+feedEqu.equId+"</td>")
		        		.append("<td>"+feedEqu.pigstyId+"</td>")
		        		.append("<td>"+feedEqu.hogcoteId+"</td>")
		        		.append("<td>"+feedEqu.equType+"</td>")
		        		.append("<td>"+feedEqu.equName+"</td>")
		        		.append("<td>"+feedEqu.workState+"</td>")
		        		.append("<td>"+feedEqu.isAutoHandle+"</td>")
		        		.append("<div clickDiv='1' onclick='editOper("+feedEqu.equId+",&quot;"+feedEqu.equType+"&quot;,&quot;"+feedEqu.workState+"&quot;,&quot;"+feedEqu.isAutoHandle+"&quot;,1,1,1)' class='am-btn-toolbar'><div class='am-btn-group am-btn-group-xs'><button type='button' class='am-btn am-btn-default am-btn-xs am-text-secondary editFlag'><span  class='am-icon-pencil-square-o'></span> 编辑</button></div></div>")
					});
					break;
				case "监控设备":
					$.each(tableBodyList.monitorEquVoList,function(index,monitorEqu){
						var tableBodyRow = $("<tr equId="+monitorEqu.equId+"></tr>");
		        		$("#tableBody").append(tableBodyRow);
		        		tableBodyRow.append("<td>"+monitorEqu.equId+"</td>")
		        		.append("<td>"+monitorEqu.pigstyId+"</td>")
		        		.append("<td>"+monitorEqu.hogcoteId+"</td>")
		        		.append("<td>"+monitorEqu.equType+"</td>")
		        		.append("<td>"+monitorEqu.equName+"</td>")
		        		.append("<td>"+monitorEqu.workState+"</td>")
		        		.append("<td>"+monitorEqu.isAutoHandle+"</td>")
		        		.append("<div clickDiv='1' onclick='editOper("+monitorEqu.equId+",&quot;"+monitorEqu.equType+"&quot;,&quot;"+monitorEqu.workState+"&quot;,&quot;"+monitorEqu.isAutoHandle+"&quot;,1,1,1)' class='am-btn-toolbar'><div class='am-btn-group am-btn-group-xs'><button type='button' class='am-btn am-btn-default am-btn-xs am-text-secondary editFlag'><span class='am-icon-pencil-square-o'></span> 编辑</button></div></div>")
					});
					break;
				default:
					break;
			}
/* 			div class="am-fr" ul class="am-pagination
			$("div tr[equId="+equId+"] td:contains("+rangMin+")")
			 <li class="am-disabled"><a href="#">«</a></li>
             <li class="am-active"><a href="#">1</a></li>
             <li><a href="#">2</a></li>
             <li><a href="#">3</a></li>
             <li><a href="#">4</a></li>
             <li><a href="#">5</a></li>
             <li><a href="#">»</a></li> */
             $(".am-pagination").empty();
             if(pageIndex <= 1){
            	 $(".am-pagination").append("<li><a onclick='changePage()' pageIndex=1>«</a></li>");
             }else{
            	 $(".am-pagination").append("<li><a onclick='changePage()' pageIndex="+(pageIndex-1)+">«</a></li>");
             }
			if(totalPage < 5){
				for(var i = 1; i <= totalPage; i++){
					$(".am-pagination").append("<li><a backEable=1 onclick='changePage()' pageIndex="+i+">"+i+"</a></li>");
				}
			}else{
				for(var i = 1; i <= 5; i++){
					$(".am-pagination").append("<li><a backEable=1 onclick='changePage()' pageIndex="+(pageIndex-5+i)+">"+(pageIndex-5+i)+"</a></li>");
				}
			}
			if(pageIndex == totalPage){
				$(".am-pagination").append("<li><a onclick='changePage()' pageIndex="+pageIndex+">»</a></li>");
			}else{
				$(".am-pagination").append("<li><a onclick='changePage()' pageIndex="+(pageIndex+1)+">»</a></li>");
			}
			$("a[backEable][pageIndex="+pageIndex+"]").parent().attr("class","am-active");
		}
	});
}
function changePage(event){
	event = event ? event : window.event;
	var obj = event.srcElement ? event.srcElement : event.target;
	var $obj = $(obj);
	if(parseInt($obj.attr("pageIndex")) == pageIndex){
		return;
	}
	pageIndex = parseInt($obj.attr("pageIndex"));
    var equType = $("#equTypeSelect").val();
    var equName = $("#equNameSelect").val();
    var pigstyId = $("#pigstyIdSelect").val();
    var hogcoteId = $("#hogcoteIdSelect").val();
	if(equName == "allEquName"){
		equName = "";
	}
	if(pigstyId == "allPigstyId"){
		pigstyId = "";
	}
	if(hogcoteId == "allHogcoteId"){
		hogcoteId = "";
	}
	var jsonConditionObj = {
		"equType": equType,
		"equName": equName,
		"pigstyId": pigstyId,
		"hogcoteId": hogcoteId,
		"pageIndex": pageIndex
	}
	$("#tableBody").empty();
	equMsgShow(JSON.stringify(jsonConditionObj),"");
}

$("#equTypeSelect").change(function(){
	if($(this).children('option:selected').val() == "" || $.trim($(this).children('option:selected').val()).length == 0){
	    return false;
	}
	$("#tableHead").empty();
    switch($(this).children('option:selected').val()){
    	case "传感器":
    		$("#tableHead").append("<th class='table-check'><input type='checkbox' class='tpl-table-fz-check'></th>")
    		.append("<th class='table-title'>设备ID</th>")
		    .append("<th class='table-title'>猪舍ID</th>")
		    .append("<th class='table-title'>猪栏ID</th>")
		    .append("<th class='table-title'>猪只ID</th>")
		    .append("<th class='table-title'>设备类型</th>")
		    .append("<th class='table-title'>设备名称</th>")
		    .append("<th class='table-title'>设备状态</th>")
		    .append("<th class='table-title'>时间间隔</th>")
		    .append("<th class='table-title'>自动异常处理</th>")
		    .append("<th id='editTitle' class='table-title'>操作</th>");
    		break;
    	case "环控设备":
    		$("#tableHead").append("<th class='table-title'>设备ID</th>")
		    .append("<th class='table-title'>猪舍ID</th>")
		    .append("<th class='table-title'>猪栏ID</th>")
		    .append("<th class='table-title'>设备类型</th>")
		    .append("<th class='table-title'>设备名称</th>")
		    .append("<th class='table-title'>设备状态</th>")
		    .append("<th class='table-title'>阈值最小值</th>")
		    .append("<th class='table-title'>阈值最大值</th>")
		    .append("<th class='table-title'>自动异常处理</th>")
		    .append("<th id='editTitle' class='table-title'>操作</th>");
    		break;
    	case "饲喂设备":
    		$("#tableHead").append("<th class='table-title'>设备ID</th>")
		    .append("<th class='table-title'>猪舍ID</th>")
		    .append("<th class='table-title'>猪栏ID</th>")
		    .append("<th class='table-title'>设备类型</th>")
		    .append("<th class='table-title'>设备名称</th>")
		    .append("<th class='table-title'>设备状态</th>")
		    .append("<th class='table-title'>自动异常处理</th>")
		    .append("<th id='editTitle' class='table-title'>操作</th>");
    		break;
    	case "监控设备":
    		$("#tableHead").append("<th class='table-title'>设备ID</th>")
		    .append("<th class='table-title'>猪舍ID</th>")
		    .append("<th class='table-title'>猪栏ID</th>")
		    .append("<th class='table-title'>设备类型</th>")
		    .append("<th class='table-title'>设备名称</th>")
		    .append("<th class='table-title'>设备状态</th>")
		    .append("<th class='table-title'>自动异常处理</th>")
		    .append("<th id='editTitle' class='table-title'>操作</th>");
    		break;
    	default:break;
    }
    $("#equNameSelect option:not(:first)").remove();
    $("#equNameSelect option:not(:first)").remove();
    $("#pigstyIdSelect option:not(:first)").remove();
    $("#hogcoteIdSelect option:not(:first)").remove();
	var jsonConditionObj = {
			"equType": $(this).children('option:selected').val(),
			"equName":"",
			"pigstyId":"",
			"hogcoteId":"",
			"pageIndex":1
	}
	equMsgShow(JSON.stringify(jsonConditionObj),"equNameSelect");
});

$("#equNameSelect").change(function(){
	if($(this).children('option:selected').val() == "" || $.trim($(this).children('option:selected').val()).length == 0){
	    return false;
	}
    $("#pigstyIdSelect option:not(:first)").remove();
    $("#hogcoteIdSelect option:not(:first)").remove();
    var equName = $(this).children('option:selected').val();
	if(equName == "allEquName"){
		equName = "";
	} 
    var jsonConditionObj = {
			"equType": $("#equTypeSelect").val(),
			"equName":equName,
			"pigstyId":"",
			"hogcoteId":"",
			"pageIndex":1
	}
	equMsgShow(JSON.stringify(jsonConditionObj),"pigstyIdSelect");
});

$("#pigstyIdSelect").change(function(){
	if($(this).children('option:selected').val() == "" || $.trim($(this).children('option:selected').val()).length == 0){
	    return false;
	}
		$("#hogcoteIdSelect option:not(:first)").remove();
    var pigstyId = $(this).children('option:selected').val();
	if(pigstyId == "allPigstyId"){
		pigstyId = "";
	}
	var jsonConditionObj = {
			"equType": $("#equTypeSelect").val(),
			"equName":$("#equNameSelect").val(),
			"pigstyId":pigstyId,
			"hogcoteId":"",
			"pageIndex":1
	}
	equMsgShow(JSON.stringify(jsonConditionObj),"hogcoteIdSelect");
});
$("#hogcoteIdSelect").change(function(){
	if($(this).children('option:selected').val() == "" || $.trim($(this).children('option:selected').val()).length == 0){
	    return false;
	}
    // 先清空第二个
    var hogcoteId = $(this).children('option:selected').val();
	if(hogcoteId == "allHogcoteId"){
		hogcoteId = "";
	}
	var jsonConditionObj = {
		"equType": $("#equTypeSelect").val(),
		"equName":$("#equNameSelect").val(),
		"pigstyId":$("#pigstyIdSelect").val(),
		"hogcoteId":hogcoteId
	}
	equMsgShow(JSON.stringify(jsonConditionObj),"");
});

function dataView(){
    sensorIds = new Array();
    sensorNames = new Array();
    var checkedIndex = 0;
       $.each($('input:checkbox:checked'),function(index){
    	   if($(this).val() != "on" || $(this).attr("name") != undefined){
       			sensorIds[checkedIndex] = $(this).val();
	       		sensorNames[checkedIndex] = $(this).attr("name");
	       		checkedIndex++;
    	   }
       });
       
       if(sensorIds.length == 0){
       	alert("请选择需要可视化的传感器!");
       	return;
       }
       if(sensorNames.length>=2){
       	for(var i = 1; i < sensorNames.length; i++){
       		if(sensorNames[0] != sensorNames[i]){
       			alert("请选择相同名称的传感器!");
       			return;
       		}
       	}
       }
       
       endTime = new Date();
       startTime = new Date();
       startTime.setDate(endTime.getDate()-7);

       $("#my-startDate").text(startTime.getFullYear()+"-"+(startTime.getMonth()+1)+"-"+startTime.getDate());
       $("#my-endDate").text(endTime.getFullYear()+"-"+(endTime.getMonth()+1)+"-"+endTime.getDate());
       sendData = {"sensorIds":sensorIds,"startTime":startTime,"endTime":endTime};
       sendAjax(sendData);
       $('#my-popup').modal(); 
}
$('#my-popup').on('closed.modal.amui', function(){
	 	clearInterval(intervalId);
});
$('#my-popup').on('close.modal.amui', function(){
 	clearInterval(intervalId);
});
$("#viewButton").click(function(){
	if(sensorIds == undefined){
		sensorIds = new Array();
	}
	var startTimeArray = $("#my-startDate").text().split("-");
	var endTimeStringArray = $("#my-endDate").text().split("-");
	
	var startTime = new Date(startTimeArray[0],startTimeArray[1]-1,startTimeArray[2]);
	var endTime = new Date(endTimeStringArray[0],endTimeStringArray[1]-1,endTimeStringArray[2]);
	sendData = {"sensorIds":sensorIds,"startTime":startTime,"endTime":endTime};
	
	sendAjax(sendData);
});
var intervalId;
function sendAjax(sendData){
	 $.ajax({
 		url:projectName+"/equ/getSensorData.do",
 		type:"get",
        data: sendData,
		success: function(result){
			var dataViewDiv = echarts.init(document.getElementById('dataViewDiv'));
			
			var sensorData = result.extend.sensorData;
			var legends = new Array();
			if(sensorIds != undefined){
				$.each(sensorIds, function (index,item) {
					legends[index] = item+"号"+sensorNames[0];
	   			});
			}
			
			
			//var dataPanelDiv = echarts.init(document.getElementById('dataPanelDiv'));
			$("#dataPanelDiv").empty();
			for(var i = 0; i < sensorIds.length; i++){
				$("#dataPanelDiv").append("<div style='width: 600px;height:280px;' id='dataPanelItem"+i+"' class='dataPanelItem'></div>");
			}

			for(var i = 0; i < sensorIds.length; i++){
				dataPanelItems[i] = echarts.init(document.getElementById('dataPanelItem'+i));
				panelOptions[i] = {
				    tooltip : {
				        formatter: "{a} <br/>{b} : {c}"
				    },
				    series: [
				        {
				            name: legends[i],
				            type: 'gauge',
				            detail: {formatter:'{value}'},
				            data: [{value: 0, name: legends[i]}]
				        }
				    ]
				};
				//alert(parseInt(($("table tr[equId="+sensorIds[i]+"] td").eq(8)).text())*1000);
			}
			intervalId = setInterval(function(){
				var sendNewData = {
						"sensorIds":sensorIds,
					};
					 $.ajax({
					 		url:projectName+"/equ/getSensorNewData.do",
					 		type:"get",
					        data: sendNewData,
							success: function(result){
								var newDataList = result.extend.newDataList;
								console.log(newDataList);
				       			$.each(newDataList, function (index, item) {
				       				console.log(item);
									panelOptions[index].series[0].data[0].value = item;
									dataPanelItems[index].setOption(panelOptions[index], true);
				       			});
								//sleep(5000);
								//getNewDataFunc(i);
								//clearInterval(intervalId);
								//intervalId = setInterval(getNewDataFunc(i),parseInt(($("table tr[equId="+sensorIds[i]+"] td").eq(8)).text())*1000);
							}
					 });
				},2000);
			/* dataPanelDiv.setOption(panelOption);
			dataPanelDiv. */
			
			
			var ydatas = new Array();
			var i = 0;
			var dataTemp = new Array();
   			$.each(sensorData, function (index, key, value) {
   				dataTemp[i] = new Array();
       			$.each(key, function (index, item) {
       				dataTemp[i][index] = new Array();
       				dataTemp[i][index][0] = ""+echarts.format.formatTime('yyyy-MM-dd hh:mm:ss',item.getTime);
       				dataTemp[i][index][1] = ""+item.sensorData;
       			});
				var temp = {
                           name: legends[i],
                           type: 'line',
                           //smooth: 0.3,
                           // data:[800, 300, 500, 800, 300, 600,500,600]
                           data: dataTemp[i]
                           //lineStyle: {
                          //     normal: {
                           //        width: 3
                           //    }
                          // }

                       };
				ydatas[i] = temp;
       			i++;
   			});
			var upColor = '#ec0000';
			var upBorderColor = '#8A0000';
			var downColor = '#00da3c';
			var downBorderColor = '#008F28';
			var option = {
			    title: {
			        text: 'Data Amount: ' + echarts.format.addCommas(1)
			    },
			   calculable: true,
                  axisTick: {
                      show: false
                  },
			    legend: {
			    	top:'5%',
			        data:legends
			    },
			    tooltip: {
			        trigger: 'axis',
			        axisPointer: {
			            type: 'line'
			        }
			    },
			    toolbox: {
			        feature: {
			            dataZoom: {
			                yAxisIndex: false
			            },
			        }
			    },
			    grid: [
			        {
			            left: '10%',
			            right: '10%',
			            bottom: 200
			        }
			    ],
			    xAxis: [{
                       axisLabel: {
                           rotate: 30,
                           interval: 0
                       },
                       axisLine: {
                           lineStyle: {
                               color: '#CECECE'
                           }
                       },
                       type: 'time',
                       boundaryGap: false,
                       splitLine: {
                           show: true,
                           interval: 'auto',
                           lineStyle: {
                               color: ['#FBFBFB']
                           }
                       },
                       axisTick: {
                           show: false
                       },

                   }],
			    yAxis: [
			           {
			              type: 'value'
			          },
			        {
			            scale: true,
			            splitArea: {
			                show: true
			            }
			        } 
			    ],
			    dataZoom: [
			        {
			            type: 'inside',
			            xAxisIndex: 0,
			           filterMode: 'none'
			        },
			        {
			            show: true,
			            xAxisIndex: 0,
			            type: 'slider',
			            bottom: 100,
			            start: 10,
			            end: 100,
			            handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
			            handleSize: '105%',
			           filterMode: 'none'
			        }
			    ],
			    visualMap: {
			        show: false,
			        seriesIndex: 1,
			        dimension: 6,
			        pieces: [{
			            value: 1,
			            color: upColor
			        }, {
			            value: -1,
			            color: downColor
			        }]
			    },
			    series:ydatas
			};
	        dataViewDiv.setOption(option,{
	            notMerge: true,
	            lazyUpdate: false
	        });
	        $('.btn-loading-example').button('reset');
   		}
 	});
}
	        	
$(function() {
   var $alert = $('#my-alert');
   $('#my-start').datepicker().
     on('changeDate.datepicker.amui', function(event) {
       if (event.date.valueOf() > endTime.valueOf()) {
         $alert.find('p').text('开始日期应小于结束日期！').end().show();
       } else {
         $alert.hide();
         startTime = new Date(event.date);
         $('#my-startDate').text($('#my-start').data('date'));
       }
       $(this).datepicker('close');
     });

   $('#my-end').datepicker().
     on('changeDate.datepicker.amui', function(event) {
       if (event.date.valueOf() < startTime.valueOf()) {
         $alert.find('p').text('结束日期应大于开始日期！').end().show();
       } else {
         $alert.hide();
         endTime = new Date(event.date);
         $('#my-endDate').text($('#my-end').data('date'));
       }
       $(this).datepicker('close');
     });
 });
$('.btn-loading-example').click(function () {
	  var $btn = $(this)
	  $btn.button('loading');
	});

/* $("[editFlag]").click(function() {
	  alert("123");
    $('#my-prompt').modal({
      relatedTarget: this,
      onConfirm: function(e) {
        alert('你输入的是：' + e.data || '')
      },
      onCancel: function(e) {
        alert('不想说!');
      }
    });
  }); */
/* $(".editFlag").click(function() {
	  alert("123");
    $('#my-prompt').modal({
      relatedTarget: this,
      onConfirm: function(e) {
        alert('你输入的是：' + e.data || '')
      },
      onCancel: function(e) {
        alert('不想说!');
      }
    });
  }); */
function editOper(equId, equType, workState, isAutoHandle, timeInterval, rangMin, rangMax){
 /* 	 var equId = equId;
	 var equName = equName;  */
	 var newWorkState;
	 var newIsAutoHandle;
	 var newTimeInterval;
	 var newRangMin;
	 var newRangMax;
	 var sendNewWorkState;
	 var sendNewIsAutoHandle;
	 
	 switch(equType){
	 case "传感器":
		$("#equControlDiv").empty();
		if(workState == "启动" && isAutoHandle == "是"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号传感器</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>采集间隔:</font> <input id='intervalButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='0' max='10' step='1' value='"+timeInterval+"'><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else if(workState == "启动" && isAutoHandle == "否"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号传感器</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>采集间隔:</font> <input id='intervalButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='0' max='10' step='1' value='"+timeInterval+"'><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else if(workState == "关闭" && isAutoHandle == "是"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号传感器</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>采集间隔:</font> <input id='intervalButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='0' max='10' step='1' value='"+timeInterval+"'><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else {
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号传感器</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>采集间隔:</font> <input id='intervalButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='0' max='10' step='1' value='"+timeInterval+"'><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}
	   /*  $('#equControl').modal({
	      relatedTarget: this,
	      onConfirm: function(e) {
	        alert('你输入的是：' + e.data || '')
	      },
	      onCancel: function(e) {
	      }
	     }); */
		 break;
	 case "环控设备":
		$("#equControlDiv").empty();
		if(workState == "启动" && isAutoHandle == "是"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号环控设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>阈值:</font> <input id='rangMinButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='20.0' max='30.0' step='0.1' value='"+rangMin+"'><font size='4'>---</font> <input id='rangMaxButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='30.0' max='40.0' step='0.1' value='"+rangMax+"'><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else if(workState == "启动" && isAutoHandle == "否"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号环控设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>阈值:</font> <input id='rangMinButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='20.0' max='30.0' step='0.1' value='"+rangMin+"'><font size='4'>---</font> <input id='rangMaxButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='30.0' max='40.0' step='0.1' value='"+rangMax+"'><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else if(workState == "关闭" && isAutoHandle == "是"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号环控设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>阈值:</font> <input id='rangMinButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='20.0' max='30.0' step='0.1' value='"+rangMin+"'><font size='4'>---</font> <input id='rangMaxButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='30.0' max='40.0' step='0.1' value='"+rangMax+"'><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else {
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号环控设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>阈值:</font> <input id='rangMinButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='20.0' max='30.0' step='0.1' value='"+rangMin+"'><font size='4'>---</font> <input id='rangMaxButton' style='font-size:25px' style='width:100px;height:25px;vertical-align:middle' type='number' min='30.0' max='40.0' step='0.1' value='"+rangMax+"'><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}
	    /* $('#equControl').modal({
		      relatedTarget: this,
		      onConfirm: function(e) {
		        alert('你输入的是：' + e.data || '')
		      },
		      onCancel: function(e) {
		      }
		     }); */
		 break;
	 case "饲喂设备":
		$("#equControlDiv").empty();
		if(workState == "启动" && isAutoHandle == "是"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号饲喂设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else if(workState == "启动" && isAutoHandle == "否"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号饲喂设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else if(workState == "关闭" && isAutoHandle == "是"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号饲喂设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else {
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号饲喂设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}
	   /*  $('#equControl').modal({
		      relatedTarget: this,
		      onConfirm: function(e) {
		        alert('你输入的是：' + e.data || '')
		      },
		      onCancel: function(e) {
		      }
		     }); */
		 break;
	case "监控设备":
		$("#equControlDiv").empty();
		if(workState == "启动" && isAutoHandle == "是"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号监控设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else if(workState == "启动" && isAutoHandle == "否"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号监控设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else if(workState == "关闭" && isAutoHandle == "是"){
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号监控设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' checked /><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}else {
			$("#equControlDiv").append("<div class='am-modal-hd'>"+equId+"号监控设备</div><div class='am-modal-bd'></div><font size='6'>运行状态:</font><input id='workStateInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><font size='6'>是否异常处理:</font><input id='isAutoHandleInput' class='switch switch-anim' onchange='checkNum()' type='checkbox' /><br/><br/><div class='am-modal-footer'><span class='am-modal-btn' data-am-modal-cancel><font size='4' color='white'>取消</font></span><span class='am-modal-btn' data-am-modal-confirm><font size='4' color='white'>提交</font></span></div>");
		}
	    /* $('#equControl').modal({
		      relatedTarget: this,
		      onConfirm: function(e) {
		        alert('你输入的是：' + e.data || '')
		      },
		      onCancel: function(e) {
		      }
		     }); */
		 break;
	default:break;
	}
 	$('#equControl').on('closed.modal.amui', function() {
	  $(this).removeData('amui.modal');
	});

	$('#equControl').modal({
	     relatedTarget: this,
	     onConfirm: function(e) {
	    	 if($("#workStateInput").is(':checked')){
	    		 sendNewWorkState = 1;
		    	 newWorkState = "启动";
	    	 }else{
	    		 sendNewWorkState = 0;
	    		 newWorkState = "关闭"
	    	 }
	    	 if($("#isAutoHandleInput").is(':checked')){
	    		 sendNewIsAutoHandle = 1;
	    		 newIsAutoHandle = "是";
	    	 }else{
	    		 sendNewIsAutoHandle = 0;
	    		 newIsAutoHandle = "否";
	    	 }
	    	 newTimeInterval = $("#intervalButton").val();
    		 newRangMin = $("#rangMinButton").val();
   			 newRangMax= $("#rangMaxButton").val();
    		 if(newWorkState==workState && newIsAutoHandle==isAutoHandle){
    			 if(newTimeInterval==timeInterval.toString() || (newRangMin==rangMin.toString() && newRangMax==rangMax.toString())){
	    			 return;
    			 }
    		 }
    		 var newState;
   			 if(newTimeInterval != undefined){
   				newState={
           			 "equId":equId,
           			 "workState":sendNewWorkState,
           		 	 "isAutoHandle":sendNewIsAutoHandle,
           		 	 "timeInterval":parseInt(newTimeInterval),
           	}; 
   			 }else if(newRangMin != undefined && newRangMax != undefined){
   				newState={
           			 "equId":equId,
           			 "workState":sendNewWorkState,
           		 	 "isAutoHandle":sendNewIsAutoHandle,
           		 	 "rangMin":parseFloat(newRangMin),
           		 	 "rangMax":parseFloat(newRangMax)
   				};
           	}else{
   				newState={
              			 "equId":equId,
              			 "workState":sendNewWorkState,
              		 	 "isAutoHandle":sendNewIsAutoHandle,
      				};	
           	}
/*     		 var newState={
    			 "equId":equId,
    			 "workState":sendNewWorkState,
    		 	 "isAutoHandle":sendNewIsAutoHandle,
    		 	 "timeInterval":parseFloat(newTimeInterval),
    		 	 "rangMin":parseFloat(newRangMin),
    		 	 "rangMax":parseFloat(newRangMax)
    		 }; */
    		 $.ajax({
    				url:projectName+"/equ/updateEquState.do",
    				type:"post",
    				contentType:'application/json;charset=utf-8',
    		        data: JSON.stringify(newState),
    				success: function(result){
    					$("table tr[equId="+equId+"] td:contains("+workState+")").html(newWorkState);
    					$("table tr[equId="+equId+"] td:contains("+isAutoHandle+")").html(newIsAutoHandle);
    					if(newTimeInterval != undefined){
	    					$("table tr[equId="+equId+"] td:contains("+timeInterval+")").html(newTimeInterval);
	    					$("table tr[equId="+equId+"] div[clickDiv]").attr("onclick","editOper("+equId+",\""+equType+"\",\""+newWorkState+"\",\""+newIsAutoHandle+"\","+newTimeInterval+",1,1)");
    					}else if(newRangMin != undefined && newRangMax != undefined){
    						$("table tr[equId="+equId+"] td:contains("+rangMin+")").html(newRangMin);
    						$("table tr[equId="+equId+"] td:contains("+rangMax+")").html(newRangMax);
	    					$("table tr[equId="+equId+"] div[clickDiv]").attr("onclick","editOper("+equId+",\""+equType+"\",\""+newWorkState+"\",\""+newIsAutoHandle+"\",1,"+newRangMin+","+newRangMax+")");
    					}else{
	    					$("table tr[equId="+equId+"] div[clickDiv]").attr("onclick","editOper("+equId+",\""+equType+"\",\""+newWorkState+"\",\""+newIsAutoHandle+"\",1,1,1)");
    					}
    				}
    			});
    		 
	     },
	     onCancel: function(e) {
	    	 $('#equControl').find('[data-am-modal-cancel]').off('click.cancel.modal.amui').on('click', function() {
	    		 alert("cancel111");
	    	});
	    	 alert("12");
	     }
    });
}
/* $(function() {
	  $('.editButton').on('click', function() {
		  alert("123");
	    $('#my-prompt').modal({
	      relatedTarget: this,
	      onConfirm: function(e) {
	        alert('你输入的是：' + e.data || '')
	      },
	      onCancel: function(e) {
	        alert('不想说!');
	      }
	    });
	  });
	}); */
</script>
</body>

</html>